import { ELogChangeID, ELogFromID } from "../constant/GameEnum";
import LogPokerVo from "../model/LogPokerVo";
import PokerVo from "../model/PokerVo";

export default class CreateVoUtils {
  /**
   * 创建 LogPoker
   * @param from
   * @param pokers
   * @param isMove
   * @param groupIndex
   */
  public static createLogPoker(from: ELogFromID, pokers: PokerVo[], isMove: ELogChangeID, groupIndex: number = -1): LogPokerVo {
    let vo: LogPokerVo = new LogPokerVo();
    vo.from = from;
    if (pokers.length > 0) {
      for (let i = 0; i < pokers.length; i++) {
        vo.addPoker(pokers[i]);
      }
    }
    vo.isMove = isMove;
    vo.groupIndex = groupIndex;

    return vo;
  }
}
